package cc.comac.mom.controller.config;

import cc.comac.mom.api.EquipDevService;
import cc.comac.mom.api.config.EquipDataConfigService;
import cc.comac.mom.bean.EquipDev;
import cc.comac.mom.bean.EquipDevBean;
import cc.comac.mom.bean.config.EquipDataConfigParamBean;
import cc.comac.mom.entity.config.EquipDataConfigEntity;
import cc.comac.mom.util.ExcelUploadUtil;
import cc.comac.mom.util.ExportExcel;
import cc.comac.mom.util.ResultBean;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;

@RestController
@RequestMapping(value ="/EquipDataConfig")
public class EquipDataConfigController {
	@Autowired
	private EquipDataConfigService equipDataConfigService;

	@RequestMapping(value = "/save",method = RequestMethod.POST)
	public ResultBean save(@RequestBody EquipDataConfigEntity obj) {
		
		return equipDataConfigService.save(obj);
		
	}
	
	@RequestMapping(value = "/update",method = RequestMethod.POST)
	public ResultBean update(@RequestBody EquipDataConfigEntity obj) {
		
		return equipDataConfigService.update(obj);
		
	}
	
	@RequestMapping(value = "/delete",method = RequestMethod.POST)
	public ResultBean delete(@RequestBody EquipDataConfigEntity obj) {
		
		return equipDataConfigService.delete(obj);
		
	}
	
	@RequestMapping(value = "/getById",method = RequestMethod.POST)
	public ResultBean getById(@RequestBody EquipDataConfigEntity obj) {
		return equipDataConfigService.getById(obj);
		
	}
	
	@RequestMapping(value = "/selectByCondition",method = RequestMethod.POST)
	public ResultBean selectByCondition(@RequestBody EquipDataConfigParamBean obj) {
		return equipDataConfigService.selectByCondition(obj);
	}


}
